import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/data/entities/task/hazard_base_page_entity.dart';
import 'package:enterprise_v6_app/router/app_pages.dart';

class HazardInvestigationController extends GetxController with GetSingleTickerProviderStateMixin {
  // late TabController tabController; //TabController 变量
  //
  // @override
  // void onInit() {
  //   super.onInit();
  //   //初始化tabController
  //   tabController = TabController(vsync: this, length: 3);
  // }

  final productiveList = [
    HazardMeBasePage(
      title: '排查计划',
      image: AppImages.icon_every_day_quiz,
      icon: AppImages.icon_base_right_arrow,
    ),
    HazardMeBasePage(
      title: '补检任务',
      image: AppImages.icon_every_week_quiz,
      icon: AppImages.icon_base_right_arrow,
    ),
    HazardMeBasePage(
      title: '隐患治理',
      image: AppImages.icon_every_month_quiz,
      icon: AppImages.icon_base_right_arrow,
    ),
    HazardMeBasePage(
      title: '年度隐患排查计划',
      image: AppImages.icon_every_month_quiz,
      icon: AppImages.icon_base_right_arrow,
    ),
  ];

  void onClickItem(HazardMeBasePage e) async {
    switch (e.title) {
      case '排查计划':
        Get.toNamed(AppRoutes.investigationPlanPage);
        break;
      case '补检任务':
        Get.toNamed(AppRoutes.supplementaryInspectionPage);
        break;
      case '隐患治理':
        Get.toNamed(AppRoutes.hazardManagementPage);
        break;
      case '年度隐患排查计划':
        Get.toNamed(AppRoutes.annualHazardInvestigationPlanPage);
        break;
      default:
        break;
    }
  }
}
